<?php

    $razonSocial = array(
        'name' => 'razonSocial_institucion',
        'class' => 'form-control',
         'maxlength'   => '50',
         'size'        => '50'
        );
    
    $departamento = array(
        'name' => 'departamento_institucion',
        'class' => 'form-control',
         'maxlength'   => '20',
         'size'        => '20'
        );
      
    
      $provincia = array(
        'name' => 'provincia_institucion',
        'class' => 'form-control',
         'maxlength'   => '30',
         'size'        => '30'
        );
          
     $distritoMunicipal = array(
        'name' => 'distritoMunicipal_institucion',
        'class' => 'form-control',
         'maxlength'   => '50',
         'size'        => '50'
        );
     $distritoEducativo = array(
        'name' => 'distritoEducativo_institucion',
        'class' => 'form-control',
         'maxlength'   => '50',
         'size'        => '50'
        );
     $uv = array(
        'name' => 'UV_institucion',
        'class' => 'form-control',
         'maxlength'   => '20',
         'size'        => '20'
        );
       
    $submit1 = array(
        'name' => 'submitNuevo',
        'value' => 'nuevo',
        'class' => 'btn btn-lg btn-danger btn-block'
        );
    
     $submit2 = array(
        'name' => 'submitFiltrar',
        'value' => 'filtrar',
        'class' => 'btn btn-lg btn-danger btn-block'
        );
    
      $submit3 = array(
        'name' => 'submitImprimir',
        'value' => 'imprimir',
        'class' => 'btn btn-lg btn-danger btn-block'
        );
    
?>
<div class="container">
    <div class="rows">
        <div style="text-align: left; width:100%; height:180px; margin-top:8px;"> 
        <?=form_open('institucion/gestionar')?>
            <h2 class="form-signin-heading">Gestionar Institucion</h2>
<fieldset>
<legend>Consulta de Datos :</legend>
            
            <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="r">Nombre/Razon Social:</label><br/>
            <?=form_input($razonSocial) ?>
            <?=form_error('RazonSocial')?>  
        </div>
        </div>
        <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="dt">Departamento:</label><br/>
             <select name="dptoInstitucion" id="dptoInstitucion">
                <option value="">Seleccionar</option>
                <option value="Beni">Beni</option>
                <option value="Chuquisaca">Chuquisaca</option>
                <option value="Cochabamba">Cochabamba</option>
                <option value="LaPaz">La Paz</option>
                <option value="Oruro">Oruro</option>
                <option value="Pando">Pando</option>
                <option value="Potosi">Potosi</option>
                <option value="SantaCruz">Santa Cruz</option>
                <option value="Tarija">Tarija</option>
             </select>
        </div>   
        </div>
        
        <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="pr">Provincia:</label><br/>
             <select name="provinciaInst" id="provinciaInst">
                <option value="">Seleccionar</option>
                <option value="Beni">Beni</option>
                <option value="Chuquisaca">Chuquisaca</option>
                <option value="Cochabamba">Cochabamba</option>
                <option value="LaPaz">La Paz</option>
                <option value="Oruro">Oruro</option>
                <option value="Pando">Pando</option>
                <option value="Potosi">Potosi</option>
                <option value="SantaCruz">Santa Cruz</option>
                <option value="Tarija">Tarija</option>
             </select>
         
        </div>   
        </div>
     
        <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="dm">Distrito Municipal:</label><br/>
            <?=form_input($distritoMunicipal)?>
            <?=form_error('DistritoMunicipal')?>

        </div> 
        </div>   
         
        <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="de">Distrito Educativo:</label><br/>
            <?=form_input($distritoEducativo)?>
            <?=form_error('DistritoEducativo')?>

        </div> 
        </div>  
         
        <div style="float:left; width:300px; height:80px; margin-top:8px;"> 
        <div class="formfield">
            <label for="uu">U.V.:</label><br/>
            <?=form_input($uv)?>
            <?=form_error('UV')?>

        </div> 
        </div>       
            <fieldset>
            <legend>Filtrar Usuarios:</legend>
            <input type="radio" name="user" id="user" value="true" checked />Habilitados<br />
            <input type="radio" name="user" id="user" value="false" />DesHabilitados<br />
            <input type="radio" name="user" id="user" value="ok" />Todos

             </fieldset>

             
            <br><br>     
          

</fieldset>
 <fieldset>
            <legend>Funciones:</legend>
             <div style="float:left; width:90px; height:40px;margin-top:4px;"> 
             <div class="formfield">
                <?=form_submit($submit1)?>
             </div>
             </div>
             
             <div style="float:left; width:90px; height:40px; margin-top:4px;"> 
             <div class="formfield">
                <?=form_submit($submit2)?>
             </div>
             </div>
             <div style="float:left; width:90px; height:40px; margin-top:4px;"> 
             <div class="formfield">
                <?=form_submit($submit3)?>
             </div>
             </div>
             </fieldset>
            
<fieldset>
<legend> Datos </legend>
<table width="100%" class="data">
  <tr>
    <th>Id Institucion</th>
    <th>Nombre/Razon Social</th>
    <th>Telefono</th>
    <th>Direccion</th>
    <th>Departamento</th>
    <th>Provincia</th>
    <th>Localidad</th>
    <th>Distrito Municipal</th>
    <th>Distrito Educativo</th>
    <th>U.V.</th>
   
    <th>Editar</th>
    <th>Eliminar</th>
  </tr>
  
<?php 

foreach($datos as $institu){ ?>
    <tr>
        <td><?php echo $institu->idInstitucion; ?></td>
        <td><?php echo $institu->Nombre; ?></td>
        <td><?php echo $institu->Telefono; ?></td>
        <td><?php echo $institu->Direccion; ?></td>
        <td><?php echo $institu->Departamento; ?></td>
        <td><?php echo $institu->Provincia; ?></td>
        <td><?php echo $institu->Localidad; ?></td>
        <td><?php echo $institu->DistritoMunicipal; ?></td>
        <td><?php echo $institu->DistritoEducativo; ?></td>
        <td><?php echo $institu->UV; ?></td>
        <td style="text-align: center;"><a href="<?= base_url()."Institucion/editar/".$institu->idInstitucion ?>"><img src="<?= base_url().'assets/img/icon_edit.png' ?>" border="0" /></a></td>
        <td style="text-align: center;"><a href="<?= base_url()."Institucion/eliminar/".$institu->idInstitucion ?>"><img src="<?= base_url().'assets/img/icon_delete.png' ?>" border="0" /></a></td>    </tr>
<?php } ?>
</table>
</fieldset>

            <?=form_close()?>
      </form>
        </div>
    </div>


